import request from '@/utils/request'

export const reqGetDepartments = () => {
  return request({
    url: 'company/department'
  })
}

export const reqDelDepartment = id => {
  return request({
    method: 'delete',
    url: `/company/department/${id}`
  })
}

export const reqAddDepartments = data => {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
export function reqGetDepartDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}

export function reqUpdateDepartments(data) {
  return request({
    method: 'put',
    url: `/company/department/${data.id}`,
    data
  })
}
